home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 004a / perfect1.zip / PERFECT.DOC next >
Text File  |  1991-12-01  |  7KB  |  167 lines

  1.  
  2.  
  3.  
  4.           ══════  ═══════ ══════  ═══════ ═══════   ═════ ══════ (R)
  5.            ══  ══  ══   ═  ══  ══  ══   ═  ══   ═  ══   ═ ═ ══ ═
  6.            ══  ══  ══      ══  ══  ══      ══     ══        ══
  7.            ═════   ════    ═════   ════    ════   ══        ══
  8.            ══      ══      ════    ══      ══     ══        ══
  9.            ══      ══   ═  ══ ══   ══      ══   ═  ══   ═   ══
  10.           ═══     ═══════ ═══  ══ ════     ══════   ═════  ════
  11.  
  12.                       P E R F E C T   b y   H e x / 2 9 A
  13.  
  14.                             (C) Copyright 1990-1991
  15.  
  16.                                 HK SQUARE INC.
  17.                          24-16 Steinway Str. Suit 580
  18.                              L.I.C., NY 11103-3612
  19.  
  20.  
  21.  
  22.          This is  Version 1.0  of PERFECT.   The  program is  written to be
  23.     compatible with clone  BIOSs and PC/MS-DOS  5.xx.  It  will run on  any
  24.     PC/XT/AT/386 or 486.
  25.  
  26.          Special thanks to  Mr. Bill Kambouroglou  for the fast  algorithm.
  27.     Enjoy it!
  28.  
  29.                                                         Hex/29A
  30.  
  31.  
  32.     PROGRAM / PROGRAMMER / DATE:
  33.     ════════════════════════════
  34.          PERFECT.EXE / Ioannis "Hex/29A" Hadjiioannou / Dec 1st 1991.
  35.  
  36.  
  37.     DISTRIBUTION:
  38.     ═════════════
  39.          PERFECT.EXE  is  a  user  supported  program.   It is now and will
  40.     always remain the  sole property of  the author.   This program may  be
  41.     freely distributed as long as the following limitations are adhered to:
  42.  
  43.            1. THE PROGRAM AND DOCUMENTATION MAY NOT BE MODIFIED.
  44.  
  45.            2. THE ENTIRE DOCUMENTATION FILE MUST BE INCLUDED WITH THE
  46.               PROGRAM.
  47.  
  48.            3. THE AUTHOR'S COPYRIGHT NOTICE IS NOT TO BE REMOVED.
  49.  
  50.            4. NO  FEE  FOR  THE  PROGRAM  MAY  BE CHARGED OUTSIDE OF A
  51.               REASONABLE CHARGE  FOR DISKETTE  MEDIA AND/OR SHIPPING.
  52.               ($2.50 MAX).
  53.  
  54.            5. IT MAY NOT BE PACKAGED  OR SOLD IN CONJUNCTION WITH ANY
  55.               OTHER PRODUCT.
  56.  
  57.            6. DISTRIBUTION   OF    THESE   FILES    (PERFECT.EXE   AND
  58.               PERFECT.DOC),  USING  THE  COMPRESSION  PROGRAM "ARC" BY
  59.               SYSTEM  ENHANCEMENT  ASSOCIATES  INC  (SEA), IS STRICTLY
  60.               PROHIBITED.
  61.  
  62.         NOTE: Shareware Houses and User Groups can distribute PERFECT
  63.               with other  programs as  long as  they register one (1)
  64.               copy  and  obtain  authorization  from  the author. See
  65.               REGISTRATION/CONTRIBUTION.
  66.  
  67.  
  68.     WARRANTY:
  69.     ═════════
  70.          THE PROGRAM  AND DOCUMENTATION  IS SUPPLIED  AS-IS AND  THE AUTHOR
  71.     DISCLAIMS  ALL  WARRANTIES,  EXPRESSED  OR  IMPLIED, INCLUDING, WITHOUT
  72.     LIMITATION, THE  WARRANTIES OF  MERCHANTABILITY AND  THE WARRANTIES  OF
  73.     FITNESS FOR ANY PURPOSE.  THE AUTHOR FURTHER RESERVES THE RIGHT TO MAKE
  74.     CHANGES TO THE  PROGRAM OR DOCUMENTATION  WITHOUT OBLIGATION TO  NOTIFY
  75.     ANY PERSON OR ORGANIZATION OF SUCH CHANGES.
  76.  
  77.  
  78.     FORMAT:
  79.     ═══════
  80.          Just type PERFECT on the command line.
  81.  
  82.  
  83.     PURPOSE:
  84.     ════════
  85.          PERFECT was  developed for  those who  want to  find if a specific
  86.     number is  a PERFECT  number or  not.   In order  for a  number to be a
  87.     PERFECT number, the sum  of its divisors must  be equal to the  number.
  88.     For example 6 is a perfect number.  Its divisors are 1, 2 and 3.  1+2+3
  89.     = 6. Also 28 is  a PERFECT number.  Its  divisors are:  1, 2,  4, 7 and
  90.     14. 1+2+4+7+14 = 28.
  91.  
  92.          PERFECT can also find all the PERFECT numbers in a given range.
  93.  
  94.  
  95.     HOW IT WORKS:
  96.     ═════════════
  97.          After executing PERFECT you will be presented with an option menu:
  98.     F1 will check only one number,  F2 will search for all PERFECT  numbers
  99.     in a given range and F3 will quit the program.
  100.  
  101.          By pressing F1 you will be asked to enter the number that you want
  102.     to check.   After entering the  number the program  will check if  that
  103.     number is a PERFECT number or not.
  104.  
  105.          By pressing  F2 you  will be  asked to  enter the  lower and upper
  106.     limit of the range that you want to check.  After that the program will
  107.     display  the  lower  and  upper  limit  along with the number currently
  108.     checked at the top of your screen.   The date and time that the  search
  109.     was started will also be shown.  Each PERFECT number that is found will
  110.     be displayed along with the date and time until the specified range  is
  111.     covered.  At that  point, the date and  time that the search  has ended
  112.     will also be displayed.
  113.  
  114.          PERFECT has a range between 0 and 2,147,483,647.  Numbers  outside
  115.     this range will not be accepted and you will be notified.
  116.  
  117.          PERFECT uses  two algorithms  to accomplish  its goal:   The first
  118.     algorithm is used  in the F1  option (check one  number).  It  uses the
  119.     assumption that  all PERFECT  numbers end  with a  6 or  a 28.  If this
  120.     condition is met, then the algorithm  will try to divide the number  in
  121.     question with all numbers between  2 and its square root  keeping track
  122.     of all the divisors.  If the sum of the divisors is equal to the number
  123.     then that number is a PERFECT number.
  124.  
  125.          The second algorithm is used in the F2 option (check a range).  It
  126.     was suggested by  Mr. Bill Kambouroglou  and its so  fast that it  will
  127.     take  the  first  algorithm  more  time  to check if 2,147,483,628 is a
  128.     PERFECT number than  the second algorithm  to find ALL  PERFECT numbers
  129.     between 0 and 2,147,483,628.  This algorithm is based on the assumption
  130.     that all PERFECT numbers have the following form:
  131.  
  132.                                     n       n-1
  133.                            IF P = (2 -1) * 2    AND
  134.  
  135.                            n
  136.                          (2 -1) is a PRIME number THEN
  137.  
  138.  
  139.                             P is a PERFECT number.
  140.  
  141.          If enough interest is generated  by this program, I will  re-write
  142.     it so that it can handle PERFECT numbers that are more that a  thousand
  143.     digits long.
  144.  
  145.  
  146.     INSTALLATION:
  147.     ═════════════
  148.          No special installation is required.
  149.  
  150.  
  151.     ERROR MESSAGES:
  152.     ═══════════════
  153.          None.
  154.  
  155.  
  156.     REGISTRATION/CONTRIBUTION:
  157.     ══════════════════════════
  158.          If you receive this program from another user or download it  from
  159.     your local  BBS and  find it  of value,  your $10  contribution will be
  160.     appreciated.  Please send comments and suggestions to:
  161.  
  162.                                 HK SQUARE INC.
  163.                              Ioannis Hadjiioannou
  164.                          24-16 Steinway Str. Suit 580
  165.                              L.I.C., NY 11103-3612
  166.                                     U.S.A.
  167.